<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <script type="text/javascript">
      let arr = [12,3,4,5];

      //key
      for(let i in arr)
      {
        alert(i);
      }

      //value
      for(let i of arr)
      {
        alert(i);
      }
    </script>
  </head>
  <body>

  </body>
</html>
